package com.scp.util;

import java.util.ArrayList;
import com.scp.banco.AcessoBase;
import android.content.Context;

public class Aplicacao {

	private static AcessoBase db = null;
	
	public static AcessoBase getDB() {
		return db;
	}
	
	public static void Iniciar(Context pContext) {
		ArrayList<String> sqlsCreateTable = new ArrayList<String>();
		sqlsCreateTable.add("CREATE TABLE [Registros] ([_id] INTEGER  NOT NULL PRIMARY KEY AUTOINCREMENT, [Data] DATE  NOT NULL, [Tempo] TIME  NOT NULL)");
		sqlsCreateTable.add("CREATE TABLE [Configuracoes] ( [_id] INTEGER  NOT NULL PRIMARY KEY AUTOINCREMENT, [Nome] VARCHAR(30)  NOT NULL, [Valor] VARCHAR(50)  NOT NULL )");
		
		db = new AcessoBase(pContext, "scp.db", sqlsCreateTable, 1);
	}	
	
}
